<!DOCTYPE html>
<html lang="zh">

<head>
	<meta charset="utf-8">
	<title>log</title>
</head>

<body>
	这是log页面
	<button id="btnGet">get生成log</button>
	<button id="btnPost">Post生成log</button>
	<div class="method">

	</div>

	<script src="./js/jquery-3.6.0.js"></script>
	<script src="./js/axios.js"></script>
	<script>
		//get点击接口接收返回值
		$("#btnGet").on("click", function () {
			axios({
				method: "get",
				//接口地址
				url: "http://127.0.0.1:618/get.do"
			}).then(function (data) {
				let Data = data['data']
				$(".method").html("")
				$(".method").append(Data)
			}).catch(function (err) {
				console.log(err)
			})
		})

		//get点击接口接收返回值
		$("#btnPost").on("click", function () {
			axios({
				method: "post",
				//接口地址
				url: "http://127.0.0.1:618/post.do"
			}).then(function (data) {
				let Data = data['data']
				$(".method").html("")
				$(".method").append(Data)
			}).catch(function (err) {
				console.log(err)
			})
		})
	</script>
</body>

</html>